package com.google.code.shardbatis.strategy;

import com.google.code.shardbatis.util.MapperUtils;

public abstract class ShardStrategy {
	
	protected String getMethod(String mapperId) {
		String name = MapperUtils.parseMapperId(mapperId)[1];
		if (name.toLowerCase().endsWith("_count")) {
			name = name.substring(0, name.toLowerCase().indexOf("_count"));
		}
		return name; 
	}
	
	public abstract String[] getTargetTableNames(String baseTableName, Object params, String mapperI);
	
}